The present invention generally relates to HTML frameset creation programs. More particularly, the present invention relates to updating a table-of-contents in a first frame of a frameset, the table-of-contents hyperlinked to a target document in a second frame of the frameset.
When viewing a document online, such as in a word processor or Internet browser, it is often difficult to navigate through sections of the document if the document is lengthy. Finding a particular passage of text or section by simply scrolling through the long document can be difficult and time consuming. It can be helpful to have a table-of-contents in a window beside the document to help navigate the document. The table-of-contents can be hyperlinked to selected sections of the document such that triggering a particular link in the table-of-contents moves the focus of the word processor or Internet browser to the desired section of the document. For this discussion, the term xe2x80x9chyperlinkedxe2x80x9d means an association between a xe2x80x9clinkxe2x80x9d in a first (xe2x80x9csourcexe2x80x9d) document and an xe2x80x9canchorxe2x80x9d in a second (xe2x80x9ctargetxe2x80x9d) document. Triggering the link in the source document brings the screen of the target document containing the anchor into focus. For this discussion, the term xe2x80x9cfocusxe2x80x9d relates to the active screen display available to the user for viewing.
From a typical user""s perspective, existing mechanisms for creating a table-of-contents hyperlinked to a target document are flawed. For instance, word processors can create a table-of-contents hyperlinked to selected portions of the target document. However, existing word processors merely create a table-of-contents within the same document. Unfortunately, to view the table-of-contents and the target document side-by-side in a HyperText Markup Language (xe2x80x9cHTMLxe2x80x9d) frameset, the two should be in separate documents. For this discussion, the term xe2x80x9cframesetxe2x80x9d means a group of windows owned by a single software program module, where each window displays the contents of a different document. Existing word processors do not provide the ability to view the table-of-contents and the target document side-by-side in an HTML frameset, such as with an Internet browser. For that reason, the table-of-contents and target document cannot be easily opened by an Internet browser for online viewing.
Certain HTML editors can create an HTML frameset containing a target document in one frame and a table-of-contents document in a second frame, with the table-of-contents document hyperlinked to selected sections of the target document. This solution allows the table-of-contents and the target document to be viewed online over the Internet. However, maintaining the validity of the hyperlinks in the table-of-contents is a tedious and time-consuming process for an evolving document. For HTML editors, a change made to the target document cannot be reflected in the table-of-contents document without manually editing the table-of-contents document.
Accordingly, a need exists for a mechanism to create an HTML frameset having a target document in one frame and a separate table-of-contents document in another frame, with the table-of-contents document hyperlinked to selected sections of the target document. Moreover, the mechanism should be self-updating such that a change in a selected section of the target document will be reflected in the table-of-contents document without the need to manually edit the hyperlinks in the table-of-contents document.
The present invention meets the above-described needs by providing the ability to create a self-updating frameset having a table-of-contents (xe2x80x9cTOCxe2x80x9d) document in one frame hyperlinked to a target document in another frame. The term xe2x80x9cframesetxe2x80x9d refers to the creation of two or more independent windows with each window simultaneously displaying a different document. The target document can be displayed in one frame beside the TOC document in another frame. In this way, a user has access to a portion of both documents simultaneously.
The TOC document can be xe2x80x9chyperlinkedxe2x80x9d to selected parts of the target document to aid in the navigation of the target document. Hyperlink entries associated with selected parts of the target document can be created in the TOC document. The selected parts of the target document can be headings distributed throughout the target document which introduce various sections of the target document. Triggering a hyperlink entry in the TOC document in one frame results in the target document scrolling until a heading associated with the hyperlink entry is visible in the other frame. Accordingly, the user can quickly scroll the target document forward or backward to a desired section by triggering a link in the TOC document corresponding to a heading at the desired section.
The TOC document is separate from the target document and may be formatted in a manner similar to any other self-contained document. The TOC document is configured such that changes in the target document are reflected without the user having to manually edit the TOC document. For example, in response to an update event, such as the opening of the TOC document, the hyperlink entries in the TOC document are recreated. Therefore, changes made to the selected parts of the target document are reflected in the TOC document without the need to manually edit the hyperlink entries in the TOC document.
In one aspect of the present invention, a self-updating frameset includes a TOC document hyperlinked to a target document. The frameset contains two frames, a first frame including the TOC document and a second frame including the target document. Both the TOC document and the target document are visible in the frameset. This allows a user to simultaneously view both the TOC document and the target document.
The TOC document typically includes a set of entries referencing subject matter in the target document. For example, the entry may be a hyperlink entry having a link to an anchor in the target document. For this discussion, the term xe2x80x9clinkxe2x80x9d refers to a specially activated word, phrase or image in a source document that, when triggered, transfers the focus to the anchor in the target document or in another part of the source document. The term xe2x80x9canchorxe2x80x9d refers to a special code or label embedded within a document that identifies the point to which focus will be transferred if the corresponding link is triggered.
The link portion of an entry in the TOC document is receptive to a triggering event, such as a mouse click, and the corresponding anchor is maintained in the target document. Once a link is triggered, the computer system responds by scrolling the target document in the frameset to the anchor. The anchor is typically embedded within the target document near a preselected heading in the target document. Accordingly, triggering the link in the TOC document in one frame causes the target document in another frame to scroll until the preselected heading of the target document is in view.
The hyperlink entry can be automatically updated to reflect a change to the target document. At identified times, the entry in the TOC document is recreated to correspond to the preselected heading. If the preselected heading has changed between the time the entry was first created and the time the entry is recreated, then the change is automatically reflected in the TOC document in response to an update task conducted at an identified time.
In another aspect of the present invention, a created frameset includes a TOC document in a first frame and a target document in a second frame. The target document contains one or more preselected headings indicating a beginning of corresponding sections in the target document. The target document can be scanned to identify each preselected heading. A hyperlink entry is created in the TOC document in response to identifying a preselected heading in the target document. As part of creating the hyperlink entry, an anchor is inserted into the target document at a location proximate to the preselected heading. Triggering the link portion of a hyperlink entry in the TOC document results in scrolling the target document until the corresponding anchor is visible.
The TOC document may be configured to recreate itself in response to a predetermined event, for instance, each time the TOC document is opened. These events are termed xe2x80x9cupdatexe2x80x9d events. In response to an update event, the target document is scanned to identify each preselected heading. In response to locating a preselected heading, a corresponding hyperlink entry is created in the TOC document. In this manner, a change made to the preselected heading will be reflected in the TOC document each time an update event occurs.
The present invention overcomes the disadvantages in the prior art by providing the ability to create an HTML frameset with the TOC document in one frame hyperlinked to the target document in another frame. In this way, the frameset created by the present invention is readable by both word processing programs and Internet browsers. This aspect overcomes the current limitation with creating a TOC within the target document, which cannot be easily transformed to an HTML frameset readable by an Internet browser. Moreover, the frameset is self-updating, thereby eliminating the need to manually maintain the hyperlinks in the TOC document based on a change in the target document.
Other features, aspects, and advantages of the present invention will become apparent upon reading the following detailed description of exemplary embodiments, taken in conjunction with the drawings and the claims.